package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenServiceidMapper;
import com.server.pinggu.domain.SenServiceid;
import com.server.pinggu.service.ISenServiceidService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenServiceidServiceImpl extends ServiceImpl<SenServiceidMapper, SenServiceid> implements ISenServiceidService {

    @Override
    public List<SenServiceid> queryList(SenServiceid senServiceid) {
        LambdaQueryWrapper<SenServiceid> lqw = Wrappers.lambdaQuery();
        if (senServiceid.getUid() != null){
            lqw.eq(SenServiceid::getUid ,senServiceid.getUid());
        }
        if (StringUtils.isNotBlank(senServiceid.getTitle())){
            lqw.eq(SenServiceid::getTitle ,senServiceid.getTitle());
        }
        if (StringUtils.isNotBlank(senServiceid.getOrgId())){
            lqw.eq(SenServiceid::getOrgId ,senServiceid.getOrgId());
        }
        if (StringUtils.isNotBlank(senServiceid.getWeiId())){
            lqw.eq(SenServiceid::getWeiId ,senServiceid.getWeiId());
        }
        if (StringUtils.isNotBlank(senServiceid.getUrl())){
            lqw.eq(SenServiceid::getUrl ,senServiceid.getUrl());
        }
        if (StringUtils.isNotBlank(senServiceid.getAppId())){
            lqw.eq(SenServiceid::getAppId ,senServiceid.getAppId());
        }
        if (StringUtils.isNotBlank(senServiceid.getAppSecret())){
            lqw.eq(SenServiceid::getAppSecret ,senServiceid.getAppSecret());
        }
        if (senServiceid.getIdType() != null){
            lqw.eq(SenServiceid::getIdType ,senServiceid.getIdType());
        }
        if (StringUtils.isNotBlank(senServiceid.getProvince())){
            lqw.eq(SenServiceid::getProvince ,senServiceid.getProvince());
        }
        if (StringUtils.isNotBlank(senServiceid.getCity())){
            lqw.eq(SenServiceid::getCity ,senServiceid.getCity());
        }
        if (StringUtils.isNotBlank(senServiceid.getEmail())){
            lqw.eq(SenServiceid::getEmail ,senServiceid.getEmail());
        }
        if (senServiceid.getFansNum() != null){
            lqw.eq(SenServiceid::getFansNum ,senServiceid.getFansNum());
        }
        if (senServiceid.getContentNum() != null){
            lqw.eq(SenServiceid::getContentNum ,senServiceid.getContentNum());
        }
        if (senServiceid.getReqNum() != null){
            lqw.eq(SenServiceid::getReqNum ,senServiceid.getReqNum());
        }
        if (senServiceid.getType() != null){
            lqw.eq(SenServiceid::getType ,senServiceid.getType());
        }
        if (senServiceid.getLevel() != null){
            lqw.eq(SenServiceid::getLevel ,senServiceid.getLevel());
        }
        if (senServiceid.getCreatetime() != null){
            lqw.eq(SenServiceid::getCreatetime ,senServiceid.getCreatetime());
        }
        if (senServiceid.getEndtime() != null){
            lqw.eq(SenServiceid::getEndtime ,senServiceid.getEndtime());
        }
        return this.list(lqw);
    }
}